package com.houweishi.module.oaDimission.timer;

import com.houweishi.common.core.domain.AjaxResult;
import com.houweishi.module.oaDimission.service.IOaDimissionService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author yqq
 * @date 2023/7/20
 * @Description 离职定时器
 */
@Component
public class OaDimissionTimer {
    private static final Logger LOGGER = LoggerFactory.getLogger(OaDimissionTimer.class);

    @Resource
    private IOaDimissionService oaDimissionService;

    /**
     * 修改员工状态
     * @return
     */
    // @Scheduled(cron = "0/10 * * * * ?")
    public AjaxResult updateStaffStatus(){
        LOGGER.info("定时器开始");
        return oaDimissionService.updateStaffStatus();
    }

}
